//////////////////////////////////////////////////
// STUDENT RESEARCH PROJECT						//
// UNIVERSITY OF HAGEN 2012						//
// File:	Message.h							//
// Date:	25.08.2012							//
// Author:	Max Pejs							//
//////////////////////////////////////////////////

#ifndef _MESSAGE_H_
#define _MESSAGE_H_

#include "typedef.h"
#include "macro.h"
#include "Utility.h"

#define MESSAGESIZE			16
#define START_OF_SEQUENCE	'!'
#define END_OF_SEQUENCE		'*'
#define FIELD_DELIMITER		','

class Message
{
private:
	char txMessage[MESSAGESIZE];
	UInt8 writePrt;

	void Write(UInt8 c);
	void Write(UInt8 * str);

public:

	Message();
	virtual ~Message();
	void WriteDataField(UInt8 * str);
	void SendMessage(void);
	void TerminateMessage(void);
};
#endif //_MESSAGE_H_